﻿<?php
$categoryname="0";
$department = $_POST['department'];   
for($i=0;$i<count($department);$i++)
{
$categoryname=$categoryname.",".$department[$i];
//echo $weeks[$i]."<br>";
}
if($_GET["inputname"]!=''){
echo "<script>window.opener.document.save.".$_GET["inputname"].".value='".str_replace("0,"," ",$categoryname)."';</script>";
}else{
echo "<script>window.opener.document.save.department.value='".str_replace("0,"," ",$categoryname)."';</script>";
}

echo '<script language="JavaScript">window.close()</script>';
//echo '您选择了'.str_replace("0,"," ",$categoryname).'';
?>

